import 'package:flutter/material.dart';
import 'package:hippo_app/values/color_value.dart';
import 'package:hippo_app/values/style_value.dart';

class Tag extends StatelessWidget {
  final EdgeInsetsGeometry? padding;
  final EdgeInsetsGeometry? margin;
  final Decoration? decoration;
  final BorderRadiusGeometry? borderRadius;
  final String label;
  final Color? color;
  final TextStyle? labelTextStyle;

  const Tag({
    super.key,
    required this.label,
    this.padding,
    this.margin,
    this.decoration,
    this.borderRadius,
    this.color,
    this.labelTextStyle,
  });

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: padding ?? EdgeInsets.only(left: 5, right: 5),
      margin: margin ?? EdgeInsets.only(right: 5),
      decoration: BoxDecoration(
        color: color ?? ColorValue.appPrimaryColor,
        borderRadius: borderRadius ?? BorderRadius.all(Radius.circular(6)),
      ),
      child: Text(label, style: labelTextStyle ?? StyleValue.tagLabelTextStyle),
    );
  }
}
